oringin_list = [1, 2, 3, 4]

for i in range(len(oringin_list)):
  for j in range(len(oringin_list)):
    for k in range(len(oringin_list)):
      if oringin_list[i] != oringin_list[j] and oringin_list[i] != oringin_list[k] and oringin_list[j] != oringin_list[k]:
        num_str = str(oringin_list[i]) + str(oringin_list[j]) + str(oringin_list[k])
        print(num_str, end=" ")
  print()
